JBOSS
Instale o JDK 6 aptitude install sun-java6-jdk Faça o download do jboss 7.1.1-Final disponivel em http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.tar.gz Também está disponivel \\df7562sr003\cetec64$\SOFTWARE\JBOSS Salve o arquivo tgz no var e descompacte-o. cd /var/ tar -xzvf jboss-as-7.1.1.Final.tar.gz Entre no diretorio /usr/local e crie um link simbólico para o jboss cd /usr/local ln -s /var/jboss-as-7.1.1.Final jboss Crie o usuario jboss adduser jboss Dê permissão ao usuário na pasta do jboss chown -R jboss:jboos /var/jboss-as-7.1.1.Final Crie o diretorio onde serão gravados os logs mkdir /var/log/jboss chown -R jboss:jboos /var/log/jboss Nesse ponto o jboss já está pronto para ser rodado em modo standalone /usr/local/jboss/bin/standalone.sh -b 0.0.0.0 Acesse o browser http://ip-do-servidor:8080/ Seria interessante ter um script que inicia o jboss corretamente no /etc/init.d/ Faça o seguinte touch /etc/init.d/jboss chmod +x /etc/init.d/jboss Crie o diretorio onde será armazenado o arquivo de lock mkdir /usr/local/jboss/lock/ chown -R jboss:jboss /usr/local/jboss/lock/ Edite o arquivo /etc/init.d/jboss e acrescente o seguinte conteudo. #!/usr/bin/env bash ### BEGIN INIT INFO # Provides: jboss-as # Required-Start: $local_fs $remote_fs $network # Required-Stop: $local_fs $remote_fs $network # Should-Start: $named # Should-Stop: $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start JBoss AS # Description: Start JBoss Application Server. ### END INIT INFO failure () { echo "FAILURE" } ### BEGIN INIT INFO # Provides: jboss # Required-Start: $local_fs $remote_fs $network # Required-Stop: $local_fs $remote_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/stop jboss service ### END INIT INFO # define where jboss is - this is the directory containing directories log, bin, conf etc JBOSS_HOME=${JBOSS_HOME:-"/usr/local/jboss"} # define the user under which jboss will run, or use 'RUNASIS' to run as the current user JBOSS_USER=${JBOSS_USER:-"jboss"} # make sure java is in your path JAVAPTH=${JAVAPTH:-"/usr/lib/jvm/java-6-sun/bin"} # if JBOSS_HOST specified, use -b to bind jboss services to that address JBOSS_BIND_ADDR=${JBOSS_HOST:-"-b 0.0.0.0"} # configuration to use JBOSS_CONFIG=${JBOSS_CONFIG:-"domain.xml"} # define the script to use to start jboss JBOSS_SCRIPT="$JBOSS_HOME/bin/domain.sh $JBOSS_BIND_ADDR" # Pid file JBOSS_PIDFILE=/usr/local/jboss/lock/lock.file # Startup and Shutdown times if [ -z "$STARTUP_WAIT" ]; then STARTUP_WAIT=30 fi if [ -z "$SHUTDOWN_WAIT" ]; then SHUTDOWN_WAIT=30 fi if [ "$JBOSS_USER" = "RUNASIS" ]; then SUBIT="" else SUBIT="su - $JBOSS_USER -c " fi if [ -z "$JBOSS_CONSOLE_LOG" ]; then JBOSS_CONSOLE_LOG=/var/log/jboss/console.log fi if [ -z "`echo $PATH | grep $JAVAPTH`" ]; then export PATH=$PATH:$JAVAPTH fi if [ ! -d "$JBOSS_HOME" ]; then echo JBOSS_HOME does not exist as a valid directory : $JBOSS_HOME exit 1 fi status () { if [ -f $JBOSS_PIDFILE ]; then read ppid < $JBOSS_PIDFILE if [ `ps --pid $ppid 2> /dev/null | grep -c $ppid 2> /dev/null` -eq '1' ]; then echo "$prog is running (pid $ppid)" return 0 else failure echo "$prog dead but pid file exists ($JBOSS_PIDFILE) " return 1 fi fi echo "$prog is not running" return 3 } start () { echo -n "Starting $prog: " if [ -f $JBOSS_PIDFILE ]; then read ppid < $JBOSS_PIDFILE if [ `ps --pid $ppid 2> /dev/null | grep -c $ppid 2> /dev/null` -eq '1' ]; then echo -n "$prog is already running" # failure echo return 1 else rm -f $JBOSS_PIDFILE fi fi mkdir -p $(dirname $JBOSS_CONSOLE_LOG) cat /dev/null > $JBOSS_CONSOLE_LOG mkdir -p $(dirname $JBOSS_PIDFILE) chown $JBOSS_USER $(dirname $JBOSS_PIDFILE) || true #$CMD_PREFIX JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT 2>&1 > $JBOSS_CONSOLE_LOG & #$CMD_PREFIX JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT & if [ ! -z "$JBOSS_USER" ]; then if [ -x /etc/rc.d/init.d/functions ]; then daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT 2>&1 > $JBOSS_CONSOLE_LOG & else su - $JBOSS_USER -c "LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT" 2>&1 > $JBOSS_CONSOLE_LOG & fi fi count=0 launched=false until [ $count -gt $STARTUP_WAIT ] do grep 'JBoss AS.*started in' $JBOSS_CONSOLE_LOG > /dev/null if [ $? -eq 0 ] ; then launched=true break fi sleep 1 let count=$count+1; done echo return 0 } stop () { echo -n $"Stopping Jboss: " count=0; if [ -f $JBOSS_PIDFILE ]; then read kpid < $JBOSS_PIDFILE let kwait=$SHUTDOWN_WAIT # Try issuing SIGTERM kill -15 $kpid until [ `ps --pid $kpid 2> /dev/null | grep -c $kpid 2> /dev/null` -eq '0' ] || [ $count -gt $kwait ] do sleep 1 let count=$count+1; done if [ $count -gt $kwait ]; then kill -9 $kpid fi fi rm -f $JBOSS_PIDFILE && rm -f $LOCKFILE echo } case "$1" in start) start ;; stop) stop ;; restart) stop sleep 15 start ;; status) status ;; *) echo "usage: $0 (start|stop|restart|status|help)" esac Para iniciar o jboss em modo Standalone basta rodar o comando /etc/init.d/jboss start ?